<#include "/includes/vars.inc"> 
<@pp.dropOutputFile />
<@pp.changeOutputFile name="${webDir}/jeecode/menu.xhtml" />
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition>
        <p:submenu label="${r"#{"}msg.jeecode${r"}"}" <#if config.login[0]?? && config.login.@type="SIMPLE"> rendered="${r"#{"}loginController.roleAdmin}"> <#else> > </#if>       	
        <#list entities.entity as entity>
        	<#if !entity.@parent[0]??>
                <#assign entityName = entity.@name>
                <#assign managedBean = entity.@name?uncap_first+"Controller">
            <p:menuitem  value="${r"#{"}msg.${entityName?uncap_first}Title${r"}"}"  
                 url="/jeecode/${entityName?uncap_first}/${entityName}Manage.jsf"
                 icon="ui-icon ui-icon-bullet"/>
           	</#if>
        </#list>
        <#if config.settings[0]??>
        	<#assign settingsName = config.settings.@name[0]!"Settings">
         	<p:menuitem  value="${r"#{"}msg.${settingsName?uncap_first}Title${r"}"}"  
                 url="/jeecode/${settingsName?uncap_first}/${settingsName}.jsf"
                 icon="ui-icon ui-icon-gear"/>
        </#if>
        </p:submenu> 
    </ui:composition>
</html>